package com.example.sourcecodelearning.proxy.service.impl;

import com.example.sourcecodelearning.proxy.service.ICEO;
import lombok.SneakyThrows;

import java.util.concurrent.TimeUnit;

/**
 * @author yuzhenxin
 * @date 2023-07-30 10:48
 */
public class CEO implements ICEO {

    @SneakyThrows
    @Override
    public int meeting() {
        System.out.println("ceo来了");
        TimeUnit.SECONDS.sleep(1);
        System.out.println("ceo走了");
        test();

        return 1;
    }

    // private无法实现对此方法的cglib动态代理
    void test() {
        System.out.println("后置处理");
    }
}
